from enum import Enum


class ResponseCodeEnum(Enum):

    FAILED_EXECUTE = "FAILED EXECUTE"

    SUCCESS_EXECUTE = "SUCCESS EXECUTE"

    UNKNOWN_EXECUTE = "UNKNOWN EXECUTE"

    TIMEOUT_EXECUTE = "TIMEOUT EXECUTE"

def get_rsp_code_enum_by_value(value: str) -> ResponseCodeEnum | None:
    for item in ResponseCodeEnum:
        if item.value == value:
            return item
    return None